var currentPage = 1;
function openPage(curpage) {
	currentPage = curpage;
	var url = location.pathname;

	var query = location.search;
	//alert(query);
	//	alert(url);
	var urls = url.split("/");
	urls[urls.length - 1] = currentPage;
	url = urls.join("/");
	//	alert(url);
	location.pathname = url+query;
	//   	document.spage.submit() ;
	return false;
}